import io.grpc.Server;
import io.grpc.ServerBuilder;

public class RpcServer {
    public static void main(String[] args) throws Exception {
        Server server = ServerBuilder.forPort(8080)
                .addService(new AuthServiceImpl())
                .build()
                .start();

        System.out.println("Server started on port 8080");
        
        Runtime.getRuntime().addShutdownHook(new Thread(server::shutdown));

        server.awaitTermination();
    }
}